home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d19 / exzt12.arc / EXZTEST.DOC < prev    next >
Text File  |  1990-07-09  |  20KB  |  589 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                                                                     ExZTEST
  25.  
  26.                                    The On-Line File Integrity Check Program
  27.  
  28.                                           Written for PCBoard v14.5 systems
  29.  
  30.                                                         Release version 1.2
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.                                                 Copyright 1990, Andy Keeves
  47.                                    The Executive Network Information System
  48.                                                         All rights reserved
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.           INTRODUCTION
  75.           ------------
  76.  
  77.                ExZTest is a  simple program  to help file  validation on  a
  78.           PCBoard  v14.5  system.    Starting  with this  version,  PCBoard
  79.           introduced on-line upload  verification and file testing  ability
  80.           through a shelled process. Although it seems simple enough to use
  81.           PKUNZIP's -t option for verification, there are a number of other
  82.           items which can  be done and  were apparently desirable by  some.
  83.           Thus, ExZTest was born.
  84.  
  85.                ExZTest will simply create a PCBFAIL.TXT or PCBPASS.TXT file
  86.           when invoked  with the proper  command line options.  These files
  87.           will be used and displayed by PCBoard to notify the caller of the
  88.           results. 
  89.  
  90.                ExZTest will handle files created  by PKWare's PKZIP, PKPACK
  91.           and PKARC programs, as well as  SEA's ARC and NoGate Consulting's
  92.           PAK programs. Although it relies on the original program (such as
  93.           PKUNZIP)  to  do  the  actual  testing,  it further  studies  the
  94.           compressed file for optional parameters.
  95.  
  96.  
  97.  
  98.           EXZTEST OPERATION AND INSTALLATION
  99.           ----------------------------------
  100.  
  101.                ExZTest  must be  installed in  PCBoard's  PCBTEST.BAT file.
  102.           Note that  PCBoard will  pass two  parameters to  this file,  the
  103.           first being the  path and file  name to test  and the second  the
  104.           optional keyword  UPLOAD. You can do some interesting things with
  105.           this file, of course,  but we'll keep the examples  fairly simple
  106.           here.  Since most Sysops that I know use the .ZIP format for file
  107.           compression we'll concentrate  on that  one. The only  difference
  108.           between .ZIP and the  others is the  program STRIPZIP which I  am
  109.           not aware of existing for the other formats.
  110.  
  111.                I do recommend you run STRIPZIP, not as much for the removal
  112.           of  .ZIP  comments  as  for  the  removal of  any  possible  file
  113.           attributes from the .ZIP just uploaded!   ExZTest assumes you use
  114.           it as a  first step.  If  you wish not  to, you can suppress  the
  115.           related message from ExZTest (keep reading for the switches).
  116.  
  117.                Note that  PKUNZIP, PKUNPAK, PKXARC, PKZIP,  STRIPZIP and/or
  118.           PAK must  be  in  a  DOS search  path  for  ExZTest  to  function
  119.           correctly!  You need  only those programs  which you use on  your
  120.           system, of course.
  121.  
  122.                A  small  program  called CLEARERR.COM  is  included  in the
  123.           distribution as well.  Note that CLEARERR *MUST*  BE LOCATED IN A
  124.  
  125.  
  126.           ExZTEST - On-Line File Integrity Checker for PCBoard 14.5       1
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.           DOS PATH WHEN  EXTEST IS  RUN!   If curious why  read the  CAVEAT
  140.           section near the end.
  141.  
  142.  
  143.                Here  is  a  sample  PCBTEST.BAT   file  (also  included  in
  144.           ExZTest's distribution):
  145.  
  146.  
  147.           @ECHO OFF
  148.           @EXZTEST %1 0 %2
  149.  
  150.  
  151.                That seems simple enough, doesn't it?  Place ExZTest.EXE  in
  152.           a DOS search path and you are nearly ready!
  153.  
  154.                So, why is this better than  simply running PKUNZIP you ask?
  155.           One reason is  that ExZTest  gives you a  simple, clean  response
  156.           file for the caller. You need not display all the notices you get
  157.           from the  other programs.   ExZTest  also performs the  following
  158.           functions for you:
  159.  
  160.                o    Automatically create PCBFAIL.TXT or PCBPASS.TXT;
  161.                o    Generates all  display  files  using  PCBoard's  "@Xnn"
  162.                     color codes;
  163.                o    Tells your  caller what  has been  done, including  the
  164.                     stripping  of the  .ZIP  comment,  verification of  the
  165.                     file, listing of the content;
  166.                o    Optionally removes unwanted files from the .ZIP.
  167.                o    Optionally  checks the  new  file  for  possible  virus
  168.                     infections;
  169.                o    Optionally adds your comment to .ZIP files;
  170.                o    Optionally logs  results with date  and file name  in a
  171.                     standard text file or on a printer;
  172.                o    Handles the output properly when PCBoard's TEST command
  173.                     has been invoked;
  174.                o    Automatically disables  requested options if  memory is
  175.                     not sufficient to execute them;
  176.                o    Optionally, checks the age of the files inside the .ZIP
  177.                     for a Sysop specified  number of days. If the  new file
  178.                     is older, it will be forced to "fail" and upload credit
  179.                     will be withheld pending your review of the file;
  180.                o    Allows the suppression of the Stripzip message;
  181.  
  182.           So, now you begin to see why this is useful, right?  Let's take a
  183.           look at how all this is accomplished through the command line!
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.           ExZTEST - On-Line File Integrity Checker for PCBoard 14.5       2
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.           PROGRAM SYNTAX
  206.           --------------
  207.  
  208.                ExZTest  is  invoked through  a  fairly simple  command line
  209.           format,  which consists  of  three  required  fields  and  a  few
  210.           optional switches:
  211.  
  212.                EXZTEST <filename> <days> [UPLOAD] [/switches]
  213.  
  214.           Note that two  of the three fields  required are passed to  it by
  215.           PCBoard via the PCBTEST.BAT file!
  216.  
  217.  
  218.           The following fields are reuired:
  219.  
  220.                <filename>     This parameter is passed to  us by PCBoard as
  221.                               batch parameter  %1. It  will likely  include
  222.                               the  drive, path,  file  name and  extension.
  223.                               Should an extension be  missing, ExZTest will
  224.                               add a ".ZIP" automatically!
  225.  
  226.                <days>         This is  a required  parameter, expressed  as
  227.                               number  of days backward  in time from today.
  228.                               To  disable date  checking, simply  specify 0
  229.                               (zero) for days.   If you wish to  allow only
  230.                               files  of a  certain  age,  however, you  can
  231.                               specify  that  here as  number  of days,  for
  232.                               instance 90 to accept only files dated within
  233.                               the last  90 days.   Note that when  the .ZIP
  234.                               contains multiple files, the most recent date
  235.                               within the .ZIP file will be used! 
  236.  
  237.                [UPLOAD]       This  parameter  is  also  passed  to  us  by
  238.                               PCBoard and is  also required. Specify  it as
  239.                               batch parameter %2. This is  how ExZTest will
  240.                               know  whether we  are  executing  a  TEST  or
  241.                               checking a new upload.
  242.  
  243.  
  244.           The following switches are all optional:
  245.  
  246.                /NS            This switch  will suppress the  automatic use
  247.                               of Stripzip, which is assumed.  If you do not
  248.                               wish to use Stripzip you must add this to the
  249.                               command line!   Note that StripZip  will ONLY
  250.                               be invoked  if the  file being  tested has  a
  251.                               .ZIP extension!
  252.  
  253.                /W             If a number other than zero was specified for
  254.                               <days> this switch will  tell ExZTest not  to
  255.                               fail the file if it is found to be older than
  256.                               expected, but  rather to  accept it  and warn
  257.  
  258.           ExZTEST - On-Line File Integrity Checker for PCBoard 14.5       3
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.                               the  caller about the file's  age.  This is a
  272.                               good way to get your callers used to the idea
  273.                               that you'll be  checking the age of  files in
  274.                               the future and  rejecting the upload,  rather
  275.                               than spring it on them overnight.
  276.  
  277.                /@<filespec>   This  is  a  list  file  containing  unwanted
  278.                               names. It is  a simple  ASCII text file,  one
  279.                               name per line, wildcards accepted, specifying
  280.                               file name and extension.  If the file exists,
  281.                               ExZTest will  shell to PKZIP  and instruct it
  282.                               to  delete  any  of the  files  found  in the
  283.                               listfile  from the newly uploaded .ZIP.  This
  284.                               option is ignored  if processing a file  with
  285.                               extension  other than  .ZIP  of  course.    A
  286.                               typical use  for  this feature  might  be  to
  287.                               remove items from the new upload, such as BBS
  288.                               ads and other undesirable files immediately.
  289.  
  290.                /&<filespec>   If  you wish  to  override ExZTest's  default
  291.                               explanations  for files  which are  found too
  292.                               old (based on your criteria  of days) you can
  293.                               write your own text file using  your favorite
  294.                               editor.  Whatever you place in this file will
  295.                               be taken as is and appended to the PCBFAIL or
  296.                               PCBPASS files,  as required. You can  use any
  297.                               text, all of  PCBoard's @ variables  and @Xnn
  298.                               color  codes,  of course.   If  this optional
  299.                               file specification is  not supplied,  ExZTest
  300.                               will use default explanations.
  301.  
  302.                /!<filespec>   If you wish to add your own comment to a .ZIP
  303.                               file  while  the  test  is  running  you  can
  304.                               specify a  file which  contains your  comment
  305.                               here.  This needs to be a standard ASCII text
  306.                               file.   If the file is not located the option
  307.                               is automatically  disabled.   Note that  this
  308.                               option will ONLY be invoked if the file being
  309.                               tested has a .ZIP extension!
  310.  
  311.                /$<filespec>   If you wish  to record the  results generated
  312.                               by  ExZTest historically,  you can  specify a
  313.                               log file here.  If no drive\path is specified
  314.                               the default directory will be used.  If /$ is
  315.                               specified   without   any  filespec   at  all
  316.                               EXZTEST.LOG will  be created  in the  default
  317.                               directory for you.   If you wish  to send the
  318.                               log output to a printer instead of a file you
  319.                               can specify either LPT1 or  LPT2 instead of a
  320.                               filespec here (i.e. /$LPT1).   Note that  you
  321.                               should not  have  a colon  (:) following  the
  322.                               LPTn specification!
  323.  
  324.           ExZTEST - On-Line File Integrity Checker for PCBoard 14.5       4
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.                /S             The /S  switch allows  you to initiate  virus
  338.                               checks.  A  copy of SCAN.EXE must  exist in a
  339.                               DOS search  path for this to  be successful!!
  340.                               DO NOT use Netscan for  this, even if running
  341.                               on a  network!!!!!!    A  temporary directory
  342.                               below  the (at  the  time) current  directory
  343.                               will be created for the tests.   Note that on
  344.                               a Novell  system the  Netware user must  have
  345.                               parental rights to the current directory!! 
  346.  
  347.                /B             Turns on the  bell option.   The 'bell'  will
  348.                               sound using  different tones for  passing and
  349.                               failing files (buzz for failure and chime for
  350.                               pass).
  351.  
  352.  
  353.                That  is the  extent of  it. The  command line  is not  case
  354.           sensitive, however, spaces MUST separate the 3 main arguments. 
  355.  
  356.                ExZTest  will  return  one  of  three DOS  errorlevels  upon
  357.           exiting to DOS:
  358.  
  359.                     Error level 0  :    No problems encountered
  360.                     Error level 1  :    Target  file  not found  or command
  361.                                         syntax error identified
  362.                     Error level 2  :    Target file failed tests
  363.  
  364.                I readily admit that I am not sure what you might wish to do
  365.           with this information, however, it is there if desired.
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.           ExZTEST - On-Line File Integrity Checker for PCBoard 14.5       5
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.           CAVEAT
  404.           ------
  405.  
  406.                While working on this  program I discovered what I  can only
  407.           term a  Microsoft bug for  now.  It  apparently is unique  to DOS
  408.           shells performed  from BC7  programs,  possibly other  QuickBasic
  409.           versions as well.   Apparently, during a shell to DOS  from a BC7
  410.           program, the first use of the DOS errorlevel by a program running
  411.           in that shell simply clears the  errorlevel and makes it useable.
  412.           I cannot figure why, but a simple  .BAT file will work every time
  413.           from DOS, correctly setting the errorlevel, while only the second
  414.           setting of the  errorlevel will take if  it is ran from  within a
  415.           BC7 shell.
  416.  
  417.                To resolve this  problem, I included a  small program called
  418.           CLEARERR.COM which clears  the DOS errorlevel  to 0 and makes  it
  419.           reliable withing the  BC7 shell.  As a result,  CLEARERR must  be
  420.           available to ExZTest  while running.   Without it, the reults  of
  421.           all TEST operations and checking of uploads other than .ZIP files
  422.           will be totally  unreliable!  All you  need to do is  place it in
  423.           your DOS  path and  it will restore  the errorlevel to  a useable
  424.           shape. 
  425.  
  426.  
  427.  
  428.           DISCLAIMER
  429.           ----------
  430.  
  431.                EXZTEST  is  distributed  "as  is".   The  author  makes  no
  432.           guarantees as to these programs' ability to run or fitness  for a
  433.           particular purpose in  your specific computing environment.   You
  434.           should  test  this  program  thoroughly  before  using  it  in  a
  435.           production environment.
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.           ExZTEST - On-Line File Integrity Checker for PCBoard 14.5       6
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.           REVISION HISTORY
  470.           ----------------
  471.  
  472.                Version 1.0    June 10, 1990       First release
  473.  
  474.                Version 1.1    June 15, 1990       Maintenance release
  475.  
  476.                  o  Added  checks  for  DOS  version  running under.    The
  477.                     program  will no longer add "@" to the DOS .BAT file if
  478.                     running on DOS versions prior to 3.30
  479.  
  480.                  o  PCBoard's "More?" prompt  is now  suppressed in case  a
  481.                     batch upload with automatic logoff is being tested
  482.  
  483.                  o  File extensions other than .ZIP, .ARC and .PAK will now
  484.                     be treated as .ZIP files.  If they are not they will be
  485.                     failed with an errorlevel of 11 as indicated by PKZIP
  486.  
  487.                  o  The program will  no longer attempt to check file dates
  488.                     if  a  file   has  failed  verification.   Version  1.0
  489.                     attempted  to do  an age  test on  the file if  one was
  490.                     indicated, regardless of previous tests
  491.  
  492.                  o  The "Zip  comment removed"  message will  no longer  be
  493.                     shown if the file has failed verification
  494.  
  495.                Version 1.2    July 8, 1990        New features added.
  496.  
  497.                  o  Added /S  switch to  allow testing  for possible  virus
  498.                     infection via SCANV.
  499.  
  500.                  o  Added /! switch to  add .ZIP comment to new  uploads on
  501.                     the fly.
  502.  
  503.                  o  Added /$ switch to allow logging of results
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.           ExZTEST - On-Line File Integrity Checker for PCBoard 14.5       7
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.           CREDITS
  536.           -------
  537.  
  538.                ExZTest likely would not have been  created if it wasn't for
  539.           the 'suggestions'  of Mark Rapp  of Microsellar BBS  who actually
  540.           proposed most of  the ideas incorporated in  the program. ExZTest
  541.           was  finally written so  that Mark can  stop asking  about it! :)
  542.           OK,  I admit that I liked the idea  as well, although my use will
  543.           likely be somewhat more limited.
  544.  
  545.                I need to acknowledge the help  I received from Dan Moore in
  546.           some  areas,   specifically  in   the  handling   of  .ZIP   file
  547.           directories.  Although  this program  does  not actually  use his
  548.           code, without it  this program would have taken  a lot longer and
  549.           would have required many more hours of research!
  550.  
  551.                Last but  not least, this  program would be  useless without
  552.           David  Terry's  efforts  (of Clark  Development  Co)  and PCBoard
  553.           14.5's many new features and abilities.
  554.  
  555.                My grateful appreciation to all!
  556.  
  557.  
  558.  
  559.           DISTRIBUTION
  560.           ------------
  561.  
  562.                ExZTest is distributed as Freeware.  As such, no fees of any
  563.           sort may  be charged for  it by anyone.   Any alterations  of the
  564.           code  are  expressly prohibited.   You  may  use ExZTest  free of
  565.           charge  with no limitations.  You may, if you wish, distribute it
  566.           on your BBS,  however, all original files must be included in the
  567.           distribution file. All  .ZIP files distributed by  me are stamped
  568.           with PKZIP's authenticity verification stamp, which should not be
  569.           removed. Should  you have an  automated process,  such as  ExZip,
  570.           which removes the  stamp, you may download the  authentic version
  571.           anytime from the Executive Network, as a free download.
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.           ExZTEST - On-Line File Integrity Checker for PCBoard 14.5       8
  589.